<header id="topbar" class="affix" style="top:60px;">
    <div class="topbar-left">
        <ol class="breadcrumb">
            <li class="crumb-active">
                <a href="#stats/vips/active/">活跃榜单</a>
            </li>
        </ol>
    </div>
    <div class="topbar-right">
        <span class="text text-muted" id="selectTips">已选中0个</span>
        <button class="btn btn-default btn-sm" id="updateStatus">修改状态</button>
        <div class="ml15 ib va-m" id="toggle_sidemenu_r">
            <a href="#" class="pl5"> <i class="fa fa-sign-in fs22 text-primary"></i>
            </a>
        </div>
    </div>
</header>

<section id="content" class="animated fadeIn">
    <% if(items.length > 0){ %>
    <div class="panel overflow">
        <table class="table table-striped fs13" id="main-list">
            <thead>
                <tr class="bg-light">
                    <th class="text-center">
                        <input type="checkbox" id="selectAll">
                    </th>
                    <th class="sortable" data-field="uid">用户ID</th>
                    <th>用户昵称</th>
                    <th>联系电话</th>
                    <th>活跃天数</th>
                    <th>所在榜单</th>
                    <th class="sortable" data-field="recharge_amount">充值金额</th>
                    <th>中奖次数/金额</th>
                    <th>回访时间</th>
                    <th>专属客服添加时间</th>
                </tr>
            </thead>
            <tbody class="admin-form">
                <% _.each(items, function(item){ %>
                    <tr data-uid="<%= item.uid %>" data-id="<%= item.id %>">
                        <td class="text-center">
                            <label class="option block mn">
                                <input type="checkbox" value="FR" class="check-row">
                                <span class="checkbox mn"></span>
                            </label>
                        </td>
                        <td><a href="#stats/account/?id=<%= item.uid %>"><%= item.uid %></a></td>
                        <td><%= item.nick_name %></td>
                        <td><%= item.phone %></td>
                        <td><%= item.active_days %></td>
                        <td><%= VIP_TYPE[item.type] %></td>
                        <td><%= item.recharge_amount%></td>
                        <td><%= item.win_count%>/<%= item.win_amount %></td>
                        <td><%= item.visit_time || '-' %></td>
                        <td><%= item.add_time || '-' %></td>
                    </tr>
                <%
                }) %>
            </tbody>
        </table>
    </div>
    <% }else{ %>
    <h4 class="text-muted">无数据</h4>
    <% } %>
</section>

<!-- 修改召回状态 -->
<div id="updateStatusPannel" class="popup-basic popup-lg bg-none mfp-with-anim mfp-hide">
    <div class="panel">
        <div class="panel-heading">
            <span class="panel-icon"><i class="fa fa-pencil"></i></span>
            <span class="panel-title">更新状态</span>
        </div>
        <div class="panel-body">
            <form id="status-form" class="form-horizontal" role="form">
            <div class="form-group" id="status-group">
                <label for="inputStatus" class="col-md-2 control-label">请选择：</label>
                <div class="col-md-6">
                    <select id="inputStatus" class="form-control" multiple>
                        <option value="1">已回访</option>
                        <option value="2">已添加专属客服</option>
                    </select>
                </div>
            </div>
            </form>
        </div>
        <div class="panel-footer text-right">
            <button class="btn btn-primary" type="button" id="submitUpdateStatus">确定</button>
        </div>
    </div>
</div>

<!-- Start: Right Sidebar -->
<aside id="sidebar_right" class="nano" style="top: 110px;">
    <div class="p20 admin-form">
        <h4 class="mt5 text-muted fw500">过滤条件：</h4>
        <hr class="short">
        <div class="section mb15">
            <label class="field prepend-icon">
                <input title="用户ID" type="text" class="gui-input" placeholder="用户ID" data-field="uid" value="<%= searched.uid %>" data-useless="">
                <label class="field-icon"><i class="fa fa-tag"></i>
                </label>
            </label>
        </div>
        <div class="section mb15">
            <label class="field prepend-icon">
                <input title="清单日期" type="text" class="gui-input date-input" placeholder="清单日期" value="<%= searched.created_at %>" data-field="created_at" data-useless="">
                <label class="field-icon"><i class="fa fa-tag"></i>
                </label>
            </label>
        </div>
        <h6 class="fw400" id="switchSearchTime">回访时间</h6>
        <div class="section row">
            <div class="col-md-6">
                <input type="text" class="gui-input date-input" data-field="visit_time.$gte" data-useless="" placeholder=">=">
            </div>
            <div class="col-md-6">
                <input type="text" class="gui-input date-input" data-field="visit_time.$lt" data-useless="" placeholder="<">
            </div>
        </div>
        <h6 class="fw400" id="switchSearchTime">专属客服添加时间</h6>
        <div class="section row">
            <div class="col-md-6">
                <input type="text" class="gui-input date-input" data-field="add_time.$gte" data-useless="" placeholder=">=">
            </div>
            <div class="col-md-6">
                <input type="text" class="gui-input date-input" data-field="add_time.$lt" data-useless="" placeholder="<">
            </div>
        </div>
        <h6 class="fw400">榜单类型</h6>
        <div class="section mb15">
            <label class="field select">
                <select data-field="type" data-useless="-1">
                    <option value="-1" <%= searched.type == -1 ? 'selected' : '' %>>所有</option>
                    <% _.each(VIP_TYPE, function(v, k){ %>
                    <option value="<%= k %>" <%= searched.type == k ? 'selected' : '' %>><%= v %></option>
                    <% }) %>
                </select>
                <i class="arrow double"></i>
            </label>
        </div>
        <h6 class="fw400">回访状态</h6>
        <div class="section mb15">
            <label class="field select">
                <select id="searchVisitStatus">
                    <option value="-1" <%= searched.visit_status == -1 ? 'selected' : '' %>>所有</option>
                    <option value="0" <%= searched.visit_status == 0 ? 'selected' : '' %>>未回访</option>
                    <option value="1" <%= searched.visit_status == 1 ? 'selected' : '' %>>已回访</option>
                </select>
                <i class="arrow double"></i>
            </label>
        </div>
        <h6 class="fw400">专属客服添加状态</h6>
        <div class="section mb15">
            <label class="field select">
                <select id="searchAddStatus">
                    <option value="-1" <%= searched.add_status == -1 ? 'selected' : '' %>>所有</option>
                    <option value="0" <%= searched.add_status == 0 ? 'selected' : '' %>>未添加</option>
                    <option value="2" <%= searched.add_status == 2 ? 'selected' : '' %>>已添加</option>
                </select>
                <i class="arrow double"></i>
            </label>
        </div>
        <hr class="short">

        <div class="row">
            <div class="col-md-6">
                <button class="btn btn-primary btn-block form-control" id="search">搜索</button>
            </div>
            <div class="col-md-6">
                <button class="btn btn-default btn-block form-control" id="export">导出</button>
            </div>
        </div>
    </div>
</aside>
<!-- End: Right Sidebar -->
